< previous page page_231 next page >

Page 231
Setting the Flags property to cdlPDPrintSetup causes the Print Setup dialog box to come up instead of the Printer Selection dialog box.
9f31265bb40b592b1929e18a47ab28e5.gif
NOTE
This dialog box actually changes your Windows default printer.
Font Dialog Box
The Font dialog box can be used to change fonts for a text box, label, or any control that has a Font property. You can invoke this dialog box using the ShowFont method of the common dialog control. You might use this dialog when you allow the user to modify the settings of the fonts within a form or within the entire application. Figure 11.10 shows an example of what the Font dialog looks like.
8160-0231a.gif
Figure 11.10
The Font dialog box.
The Font dialog box is generated with the following code:
9f31265bb40b592b1929e18a47ab28e5.gif
Private Sub cmdFont_Click()
   ' Select both printer and screen fonts
   cdlCommon.Flags = cdlCFBoth
   ' Display the Font dialog box
   cdlCommon.ShowFont

   ' Get the Font information
   With lblFont
      .FontName = cdlCommon.FontName
      .FontBold = cdlCommon.FontBold
      .FontItalic = cdlCommon.FontItalic
      .FontSize = cdlCommon.FontSize
   End With
End Sub

 
< previous page page_231 next page >

If you like this book, buy it!